﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package com.tremormedia.acudeo.ad {
    import flash.utils.*;
    import com.tremormedia.acudeo.ad.enums.*;
    import com.tremormedia.acudeo.*;
    import com.tremormedia.acudeo.banner.*;

    public class Ad implements IAd {

        private var _ad:Object;
        private var _banners:Array;// = null

        private static var _ads:Dictionary = new Dictionary(true);

        public function Ad(_arg1:Object){
            _ad = _arg1;
        }
        public function get type():AdType{
            return (AdType.valueOf(_ad.type));
        }
        public function get description():String{
            return (_ad.description);
        }
        public function get banners():Array{
            var _local1:uint;
            if (_banners == null){
                _banners = new Array();
                _local1 = 0;
                while (_local1 < _ad.banners.length) {
                    _banners.push(Banner.getBanner(_ad.banners[_local1]));
                    _local1++;
                };
            };
            return (_banners);
        }
        public function get loadProgress():Number{
            return (_ad.loadProgress);
        }
        public function get responseCode():Number{
            return (_ad.responseCode);
        }
        public function get extProps():Object{
            return (_ad.extProps);
        }
        public function get duration():Number{
            return (_ad.duration);
        }
        public function get xml():XML{
            return (_ad.xml);
        }
        public function get subType():AdSubType{
            return (AdSubType.valueOf(_ad.subType));
        }
        public function get id():String{
            return (_ad.id);
        }
        public function get title():String{
            return (_ad.title);
        }
        public function get position():AdPosition{
            return (_ad.position);
        }
        public function get progress():Number{
            return (_ad.progress);
        }
        public function get url():String{
            return (_ad.url);
        }
        public function get adSystem():AdSystem{
            return (AdSystem.valueOf(_ad.adSystem));
        }
        public function get videoUrl():String{
            return (_ad.videoUrl);
        }
        public function get adTag():String{
            return (_ad.adTag);
        }

        public static function getAd(_arg1:Object):Ad{
            if (!_ads[_arg1]){
                _ads[_arg1] = new Ad(_arg1);
            };
            return (_ads[_arg1]);
        }

    }
}//package com.tremormedia.acudeo.ad 
